/* 
 * File:   MainWindow.hpp
 * Author: loreilei
 *
 * Created on 27 janvier 2013, 19:52
 */

#ifndef MAINWINDOW_HPP
#define	MAINWINDOW_HPP

#include <QtGui>
#include <cmath>
#include <ctime>

class MainWindow : public QMainWindow {
    Q_OBJECT
public:
    MainWindow();

    virtual ~MainWindow();
    
protected :
    void buildUI();
    void buildEncodageTab();
    void buildDecodageTab();

protected slots :
    void chooseCouvertureFile();
    void chooseCacheeFile();
    void cacherImage();
    void sauverResultat();
    void choosePictureToDecode();
    void decodePicture();
    void sauverImageDecodee();
    
private:
    QStatusBar *statusBar;
    QMenuBar *menuBar;
    QMenu *menuFichier;
    QTabWidget *central;
        
    //Pour l'encodage
    QWidget *encodageTab;
    QGridLayout *encodageTabLayout;
    QSpinBox *nbBitsEncodage;
    QLabel *nbBitsLabelEncodage;
    
    QImage *couvertureImage;
    QPushButton *couvertureChooser;
    QLabel *couvertureLabel;
    QLabel *couverturePixmap;
    
    QImage *cacheeImage;
    QPushButton *cacheeChooser;
    QLabel *cacheeLabel;
    QLabel *cacheePixmap;
    
    QImage *resultatImage;
    QPushButton *resultatChooser;
    QLabel *resultatLabel;
    QLabel *resultatPixmap;
    QPushButton *sauveResultat;
    
    //Pour le décodage
    QWidget *decodageTab;
    QGridLayout *decodageTabLayout;
    QSpinBox *nbBitsDecodage;
    QLabel *nbBitsLabelDecodage;
    
    QImage *aDecoderImage;
    QPushButton *aDecoderChooser;
    QLabel *aDecoderLabel;
    QLabel *aDecoderPixmap;
    
    QImage *decodeeImage;
    QPushButton *decodeeChooser;
    QLabel *decodeeLabel;
    QLabel *decodeePixmap;
    QPushButton *decodeeResultat;
    
};

#endif	/* MAINWINDOW_HPP */

